package com.juyu.miliao.api.controller;

import com.alibaba.fastjson.JSONObject;
import com.juyu.miliao.api.service.AppKeyService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 新手引导控制器
 * @Auther: 卜加超
 * @Date: 2019/4/25 10:36
 * @Description:
 */
@RestController
@RequestMapping("/guide")
public class GuideController {
    @Resource
    private AppKeyService appKeyService;
    /**
     * 新手帮助
     */
    @PostMapping("/helpNovice")
    public JSONObject getHelpNoviceValue(){
        JSONObject jsonObject = new JSONObject();
        String helpNovice = appKeyService.getAppKeyByKey("helpNovice").getValue();
        jsonObject.put("helpNovice",helpNovice);
        return jsonObject;
    }

    /**
     * 新手帮助
     */
    @PostMapping("/sistersGuide")
    public JSONObject getSistersGuideValue(){
        JSONObject jsonObject = new JSONObject();
        String sistersGuide = appKeyService.getAppKeyByKey("sistersGuide").getValue();
        jsonObject.put("sistersGuide",sistersGuide);
        return jsonObject;
    }

}
